/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Constructures;

/**
 *
 * @author Ibon
 */
public class Animal {
       String name;

    Animal(String name) {
        this.name = name;
    }

    Animal() {
        this(makeRandomName());
    }

    static String makeRandomName() {
        int x = (int) (Math.random() * 5);
        String name = new String[]{"Fluffy", "Fido", "Rover", "Spike", "Gigi"}[x];
        return name;
    } 
}
